<template>
	<view>
		<van-popup :show="visible" class="erweima-con"
			custom-style="width: 610rpx; height: 680rpx; padding: 85rpx 35rpx 21rpx; border-radius: 8rpx;z-index:99999"
			@click-overlay="hide">
			<div class="content">
				<slot name="headerTips"></slot>
				<view class="erweima-img">
					<image class="erweima" :show-menu-by-longpress="true"  :src="erweimaUrl" alt="">
				</view>
				<slot name="footTips"></slot>

			</div>
		</van-popup>

	</view>
</template>

<script>
	export default {
		props: {
			erweimaUrl: {
				type: String,
				default: 'https://vihome.s3.ca-central-1.amazonaws.com/mini-app-static/official_account_qr_code.png' // 公众号
			}
		},
		data() {
			return {
				visible: false,
			}
		},
		methods: {
			show() {
				this.visible = true;
			},
			hide() {
				this.visible = false;
			}
			

		}
	}
</script>

<style lang="scss" scoped>
	.erweima-con {
		display: flex;
		justify-content: center;

		.content {
			text-align: center;
			font-size: 27rpx;
			// color: #C7B6A1;
		}

		.erweima-img {
			width: 380rpx;
			height: 380rpx;
			margin: 0 auto;

			.erweima {
				width: 100%;
				height: 100%;
			}
		}
	}
</style>